package com.abcd.toast

import android.view.View
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.NativeModule
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.uimanager.ReactShadowNode
import com.facebook.react.uimanager.ViewManager
import java.util.*

/**
 * 实现
 *      1. createViewManagers中返回Collections.emptyList()
 *      2. createNativeModules方法中添加模块
 *      3. 这个ToastExampleReactPackage需要在MainApplication的getPackages方法中提供
 * Created by mazaiting on 2018/6/6.
 */
class ToastExampleReactPackage : ReactPackage {
    override fun createNativeModules(reactContext: ReactApplicationContext): MutableList<NativeModule> {
        return Arrays.asList(ToastModule(reactContext))
    }

    override fun createViewManagers(reactContext: ReactApplicationContext?): MutableList<ViewManager<View, ReactShadowNode<*>>> {
        return Collections.emptyList()
    }

}